From: Matěj Suchánek Date: Sat, 3 Feb 2018 16:23:44 +0000 (+0000) Subject: Tag redirects from moves as new redirects X-Git-Tag: 1.31.0-rc.0~618^2 X-Git-Url: https://git.cyclocoop.org/admin/%7B%24plugin.url%7Cescape%7D?a=commitdiff_plain;h=18a2fd3268d1864d1480d5bfef0a69abf55a0dd4;p=lhc%2Fweb%2Fwiklou.git Tag redirects from moves as new redirects Bug: T184117 Change-Id: Ic9a0abcb530787f652e7d439ecc7cac5f603be56 --- diff --git a/includes/MovePage.php b/includes/MovePage.php index fe8246535f..fc9f6a6676 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -597,7 +597,12 @@ class MovePage { $redirectArticle->doEditUpdates( $redirectRevision, $user, [ 'created' => true ] ); - ChangeTags::addTags( $changeTags, null, $redirectRevId, null ); + // make a copy because of log entry below + $redirectTags = $changeTags; + if ( in_array( 'mw-new-redirect', ChangeTags::getSoftwareTags() ) ) { + $redirectTags[] = 'mw-new-redirect'; + } + ChangeTags::addTags( $redirectTags, null, $redirectRevId, null ); } }